-
-
Notifications
You must be signed in to change notification settings - Fork 50
Custom package collections #3429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
struct PackageListRepositoryClient { | ||
var fetchCustomCollection: @Sendable (_ client: Client, _ url: URL) async throws -> [URL] | ||
var fetchCustomCollections: @Sendable (_ client: Client) async throws -> [CustomCollection.DTO] | ||
// TODO: move other package list dependencies here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will do this in a follow-up PR right after this one but I wanted to keep the change set focused.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this illustrates how we would set up grouped dependencies (like Github, for instance) with the new Dependencies
mechanism.
} | ||
|
||
func filter(by urls: some Collection<URL>) -> Self { | ||
filter(\.$url ~~ urls.map(\.absoluteString)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an SQLKit
based way to make this a case-insensitive filter but it's a bit more complicated. I'll leave that to a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When doing that, we should also canonicalise the urls from the custom collection. Since they are not added via our normal package list mechanism and validated (canonicalised) in the process, we can't assume they're all as well-formed as they are in the main package list.
Ad hoc deploying the branch for testing. |
1f16519
to
ee683dc
Compare
ee683dc
to
5efe3f3
Compare
This adds scheme and reconciliation support for custom package collections (#2957) and reads the SSWG package's sandbox, incubating, and graduated package lists (from a temporary location).
Does not include any visual representation or use of the data in search yet.